package net.stratusprogramming.school.Game.Screens;


import net.stratusprogramming.school.Game.Framework.Screen;
import net.stratusprogramming.school.Game.Framework.Battle.Combatant;
import net.stratusprogramming.school.Game.Framework.System.InstanceMgr;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;


public class InventoryScreen extends Screen{

		/** Player to get stats/inventroy items from */
		private Combatant player;
		/** Input from slick */
		private Input input;
		/** Screen to set when done */
		private Screen retScreen;
		
		/**
		 * Creates a new Inventory screen
		 * 
		 * @param retScreen screen to set when done
		 */
		public InventoryScreen(Screen retScreen) {
			input = InstanceMgr.input;
			player = InstanceMgr.player;
			this.retScreen = retScreen;
		}
		
		@Override
		public void update(int delta) {		
			if(input.isKeyPressed(Input.KEY_I) || input.isKeyPressed(Input.KEY_ESCAPE)) {
				InstanceMgr.main.setScreen(retScreen);
			}
			}
		
		@Override
		public void render(Graphics g) {
			
			g.drawString("Player: " +player.getName() , 10, 30);
			g.drawString("Health: " + player.getHealth(), 10, 50);
			g.drawString("Mana: " + player.getMana(), 10, 70);
			g.drawString("Weapons: "+ player.getWeapons(), 10, 90);
			g.drawString("Spells: "+ player.getSpells(), 10, 150);
			g.drawString("Items: "+ player.getItems(), 10, 210);
		}
			
}
			

